﻿using Common.FrontEnd;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;

namespace Common
{
    /// <summary>
    /// Represents a set of acoustic data that can be scored against a feature
    /// </summary>
    public interface ISenone : ISerializable
    {
        /**
        /// Calculates the score for this senone based upon the given feature.
         *
        /// @param feature the feature vector to score this senone against
        /// @return the score for this senone in LogMath log base
         */
        float getScore(IData feature);


        /**
        /// Calculates the component scores for the mixture components in this senone based upon the given feature.
         *
        /// @param feature the feature vector to score this senone against
        /// @return the scores for this senone in LogMath log base
         */
        float[] calculateComponentScore(IData feature);


        /**
        /// Gets the ID for this senone
         *
        /// @return the senone id
         */
        long getID();


        /**
        /// Dumps a senone
         *
        /// @param msg an annotation for the dump
         */
        void dump(String msg);

        /**
        /// Returns the mixture components associated with this Gaussian
         *
        /// @return the array of mixture components
         */
        IMixtureComponent[] getMixtureComponents();

        /**
        /// 
        /// @return the mixture weights vector
         */
        float[] getLogMixtureWeights();
    }
}
